package cn.zust.ly.dto;

import cn.zust.ly.entity.Tuser;

import java.io.Serializable;

/**
 * Created by liy on 2016/12/5.
 */
public class SessionInfo implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /*
     * ID organization登录时为联系人的id，member登录时为登录id
     */
    private int userId;

    /*
     * 真实姓名 organization登录时为联系人的真实姓名，member登录时为登录者的真实姓名
     */
    private String realName;

    /*
     * 登录名 ，member登录时为loginName ，driver时为 手机号
     */
    private String loginName;

    public SessionInfo(){}

    public SessionInfo(Tuser user){
        this.userId = user.getId();
        this.loginName = user.getUsername();
        this.realName = user.getName();
    }


    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }
}
